Electrical energy meter with programmable register component

ABSTRACT

An energy meter capable of converting from one mode of operation to another mode of operation is described. In the one embodiment, the present apparatus measures energy consumption, and converts operation from a first mode to a second mode.

This application is a continuation of application Ser. No. 07/764,863,filed Sep. 24, 1991, now abandoned.

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the fascimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

I. BACKGROUND OF THE INVENTION

A. Field of the Invention

The present invention generally relates to energy meters, and morespecifically, relates to energy meters having the flexibility to performvarious types of metering functions.

B. Related Art

In the art of energy metering, those skilled in the art typically view ameter as being composed of two (2) basic components--a meteringcomponent and a register component. The metering component is coupled toa power distribution network and generates signals indicative of powerconsumption. These signals are passed to the register component whichperforms such functions as storing the signals in a time-of-use formator a demand-type format.

Once a month or so, a meter reader is dispatched to "read" the meter. Insome cases, reading a meter may simply involve downloading the registercomponent memory into a portable electronic memory storage devicecarried by the meter reader.

Recently, meter manufacturers have begun manufacturing the meteringcomponent and register component in fully solid state form. Thistransition is due, at least in part, to the desire of power utilitycompanies to have energy meters with the flexibility to perform a widearray of functions. Such flexibility can only be provided using solidstate technology.

One significant and potential cost-saving feature made possible with thetransition to solid state technology is to provide "convertible" meters.This means that the register component can be converted from performing,for example, demand-only functions to demand and time-of-use functions.The register component, therefore, is convertible from one function toother functions.

Until now, however, such convertibility was only provided by removingthe register component and substituting another register componentcapable of performing the desired function. For example, a demand-onlyregister component would be removed from the meter and replaced with ademand and time-of-use register component. Rather than being"convertible", these register components actually are "replaceable"modules. An example of a modular register component is set forth in U.S.Pat. No. 5,014,213.

It is desirable, therefore, to provide a truly convertible registerwhich does not require removing and replacing one register component foranother in order to change register function.

II. SUMMARY OF THE INVENTION

The present invention, in one embodiment, is an operating systemutilized in register component applications. The operating systemcoordinates the task execution sequence and priority of major tasks tobe executed by the register component. The operating system, in the oneembodiment, is table driven. The tables are a form of indirectaddressing to respective software routines which control operation ofthe register component to perform respective tasks in a predeterminedorder.

The tables are executed from RAM, and may point to software routinesstored in either ROM or RAM. More particularly, the task tables arecomposed of pointers to modules which perform respective tasks such askeeping track of timers and counters for "time and date" information. Bychanging the operation mode of the operating system, a different set oftasks are executed.

In the normal execution mode, the operating system executes an infiniteloop, i.e., unless an interrupt or "new priority" flag is set, theoperating system continues to execute through the loop. This loop issometimes referred to herein as the "kernel" loop. At the beginning ofthe kernel loop, a MODE byte is read to index an entry in a MODE TABLE.Each of the entries in the MODE TABLE is a pointer to a task tableentry. Each entry in the task table is a pointer to a software routine.

The operating system causes the first task of the selected task table tobe executed, then checks whether there is any request for an immediatemode change. As long as there is no request for an immediate modechange, the tasks of the selected task table are executed in sequence asdefined in the selected task table and until the end of the selectedtask table is reached, i.e., until the last task in the selected tasktable is executed. When the end of the selected task table is reached,or if an immediate mode change is requested, the operating systemre-loads the value of the MODE byte and re-indexes the MODE TABLE. Thenewly selected task table is then executed.

If no mode change has been requested, either immediate or regular, thenthe task table "pointed to" will be the same task table just executed.An important point to note is that when a mode change occurs, task 0 ofthe selected task table is the first task executed. If no mode changehas occurred, and the task table just executed is again selected, task 1of the task table is the first task executed.

Task 0 of each task table is referred to as the mode initialization taskand provides a place where routines may be located which only need to beexecuted once per mode, rather than once per task table cycle during themode. If there are no routines in a mode that have this requirement, themode initialization task simply returns control to the operating system,which then continues execution of the task table beginning with task 1.

In the one embodiment, to convert a register component having thepresent operating system from a Demand-Only register to a Time-of-Useand Demand register, for example, task tables are loaded into theregister component and a different mode is selected. The additional tasktables are utilized for performing necessary time-of-use "functions. Byselecting an appropriate mode, the execution sequence of task tables ischanged so that the appropriate task tables are executed.

The present invention, importantly, provides that a register componentcan be changed from a demand-only register to a time-of-use and demandregister without requiring that the register component be removed andreplaced. The present invention facilitates providing a trulyconvertible register.

III. BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects of the present invention, together with furtherfeatures and advantages thereof, will become apparent from the followingdetailed specification when read together with the accompanyingdrawings, in which:

FIG. 1 is a block diagram description of one embodiment of meteringmeans which may be utilized with the present invention;

FIG. 2 is a block diagram description of one embodiment of registermeans;

FIG. 3 is a flow chart illustrating one embodiment of a sequence ofprocess steps in accordance with the present invention; and

FIG. 4 illustrates a mode table and task tables.

IV. DETAILED DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram description of one embodiment of meteringmeans 100 which may be utilized with the present invention.Particularly, line current inputs and line voltage inputs are providedto the metering means 100 and watthour output pulses and VAR/Q houroutput pulses are output by the metering means 100, and the watthouroutput pulses and VAR/Q hour output pulses are provided to the registercomponent 150 hereinafter described with reference to FIG. 2. Thewatthour output pulses and the VAR/Q hour pulses, respectively, areproportional to real and reactive energy consumption, respectively.

The line voltage and the line current inputs are electrically isolatedand precisely scaled by respective scaling and isolation means 102 and104 to provide secondary signals compatible with electronic circuitry.Voltage scaling to provide 1.6 Vrms at rated input voltage (120 V, forexample) is suitable. Current scaling ratios of 100,000-to-one and10,000-to-one, respectively, may be selected for self-contained(Full-scale 200 amperes) and transformer-rated (Full-scale 20 amperes)meters, respectively. Full scale secondary current from the currentsensor is then 2.0 milliamps rms. A precision current-to-voltageconverter 106 in the current input path converts a current signal into avoltage for compatibility with an A/D (analog-to-digital) converter. Thescaling of the current-to-voltage converter is one volt output permilliamp input (1,000 ohms).

Adjustments for gain are provided by adjusting a gain stage 108 in thecurrent path. A first A/D converter 110 is provided for the currentsignal and a second A/D converter 112 is provided for the voltagesignal. Both A/D converters have a full-scale range of approximately±3.45 volts dc, as determined by VREF from a precision voltage reference113. The precision time base (CLOCK) 114 establishes a constant samplerate at which the A/D converters simultaneously "sample" the current andvoltage inputs and convert their amplitudes to binary words. Samplerates in excess of several kilohertz are required to obtain goodperformance for harmonics in the input signals. Phase adjustment, toprecisely match the phase of the current and voltage input signals, isprovided by shifting the sample time of the voltage converter relativeto the current converter in small discrete steps.

To obtain output pulses proportional to watthours, each binary-codedcurrent sample is multiplied at a multiplier 116 by its correspondingvoltage sample and the product is added to an accumulator 118. Each timethe accumulated sum reaches a threshold value, proportional to the meterwatthour constant, an output pulse is generated. The output pulse ratehas been selected to be twelve times the rate of one disk revolution foran equivalent electromechanical meter to maintain compatibility withpast generations of metering devices.

Output pulses proportional to varhours or Qhours are obtained in thesame fashion as watthours except the voltage samples used are delayed,by a delay unit 120, a time equivalent to 90 degrees for varhours or 60degrees for Qhours, either of which can be selected. Each binary codedcurrent sample is multiplied at a multiplier 122 by the correspondingvoltage sample and a separate accumulator 124 is used for varhour orQhour accumulations. The same threshold as the watthour accumulatorthreshold is used as the varhour or Qhour thresholds. A typicalthreshold value is 144(10⁻⁶) volt-ampere-seconds (for a self-containedone-element meter for two-wire-single-phase applications).

For multiple phase loads, a multiplexer (not shown) can be used toextend the meter function. Separate isolation and scaling should beprovided for each current and voltage input, but the remaining elementscan be "time-shared".

Accuracy is primarily limited by noise, A/D converter resolution,linearity of input scaling, linearity of the current-to-voltageconverter, and linearity of the A/D converters. Stability of performancewith time and temperature is limited by the stability of input scaling,stability of the current-to-voltage converter resistor, and stability ofthe time base and voltage reference. An apparent inaccuracy can appearat high output pulse rates combined with a few output pulses permeasurement. This occurs because of the cyclic nature of power flow attwice the line frequency causing "jitter" on the output pulse rate. Thiscan be overcome by increasing the number of output pulses permeasurement.

FIG. 2 is a block diagram description of the register component means150. The block diagram functions can be provided, for example, on a 1.2micron CMOS application specific integrated circuit (ASIC) as is wellknown in the art.

The ASIC includes a microcontroller 152 coupled to an address, data,control, and umacro bus 154 (hereinafter referred to as the "bus"). Aliquid crystal display controller 156 is coupled directly to the bus 154and indirectly coupled to the bus 154 through a logic interface 158. Apower outage timer 160, coupled to an oscillator 162, is coupled to thebus 154. A memory 164 including, for example, a ROM, EEPROM, and SRAMtype memory blocks, also is coupled to the bus 154. The ASIC 150 alsoincludes (but not shown) address decoding logic to define ASIC memorymap, bank switching logic to extend processor address space, andcommunication gating logic to route register data for programming andretrieval purposes.

In operation, the microcontroller 152 performs calculating and ASICcontrol functions. The liquid crystal display controller 156 is utilizedto control input/output means such as a liquid crystal display. Thepower outage timer 160, coupled to the oscillator 162, is used fortimekeeping in the event of a power outage. Metering data, programs, andother information are stored in the memory 164. Further details withregard to measuring energy consumption are provided in commonlyassigned, co-pending, U.S. patent application Ser. No. 07/691,252, filedApr. 25, 1991, entitled "Method For Determining Electrical EnergyConsumption", which is incorporated, in its entirety, herein byreference.

FIG. 3 is a flow chart 200 illustrating one embodiment of a sequence ofprocess steps in accordance with the present invention. The processsteps are executed by the microcontroller 152 operating under thecontrol of an algorithm stored in the memory 164. More particularly, oneaspect of the present invention is referred to as an operating systemkernel (os₋₋ kernel). The operating system controls operations of theregister component hardware configuration hereinbefore described withreference to FIG. 2 and the term "kernel" refers to the portion of theprogram which controls sequencing through respective task tables. Theflow chart 200 illustrates the algorithm for executing respective tasktables.

More particularly, once the os₋₋ kernel is initiated as indicated at astart block 202, the next step 204 is set the task₋₋ table₋₋ index toequal zero. Then, as indicated at a step 206, the next operation is toset the task₋₋ table equal to the table at the address identified in themode₋₋ table indexed by the current₋₋ os₋₋ mode. More particularly, themode byte is read to index an entry in the mode table. Each of theentries in the mode table is a pointer to a task table. For example,referring to FIG. 4, examples of mode and task tables used by theoperating system as illustrated in flow chart form in FIG. 3 are setforth. In the mode table 300, the first entry is a pointer to task table302. A subsequent entry is a pointer to task table 304. Each entry inthe task table is a pointer to a main subroutine of a high-level task.

For the first iteration, the os₋₋ kernel then executes the first task ofthe task table. It is then determined whether the end of the task₋₋table has been reached as indicated at a step 208. This means that it isdetermined whether the last task to be executed in a task table has beenexecuted. If the last task has been executed, then operations proceed tostep 210 wherein the previous₋₋ os₋₋ mode is set to the current₋₋ os₋₋mode and the current₋₋ os₋₋ mode is set to the next₋₋ os₋₋ mode asindicated at step 212. This means that, at least with regard to steps210 and 212, the mode of operation has not been changed and the sametask tables are to be executed.

Then, at step 214, it is determined whether a mode change has been made.If a mode change has been made, then the task₋₋ table₋₋ index is set toequal zero so that the initial task in the task table to be executed isexecuted first. However, if no mode change has occurred, then the task₋₋table₋₋ index is set to equal the FIRST₋₋ REPEATED₋₋ TASK. This meansthat if a task table is to be newly executed for the first time, thenthe mode initialization task (index=0) is to be executed (step 216). If,however, the mode has not changed and the task table is to bere-executed, the mode initialization task is not to be re-executed (step218). That is, mode initialization tasks are to be performed only onceper mode rather than once per task table cycle during the mode. Once thetask table index is set to the appropriate setting, operations return tostep 206.

If the end of the task₋₋ table has not been reached, as indicated at thestep 208, then operations proceed to step 220. At step 220, it isdetermined whether an immediate mode change has been requested. If animmediate mode change has been requested, then operations proceed tostep 210 and the operations hereinbefore described are executed.

If, however, no immediate mode change has been requested, then thetask₋₋ page is set to equal the RAM page of the task specified in thetask₋₋ table, i.e., the next task is selected for execution. The task₋₋address is set to equal the address of the task specified in the task₋₋table as indicated at a step 224.

If the task₋₋ address designated is in the code downloaded into RAM asindicated at step 226, then operations proceed to step 228 where thecode₋₋ ram₋₋ page is set to equal the task₋₋ page. If the task addressis not in the code downloaded into RAM, however, then the data₋₋ ram₋₋page is set to equal the task₋₋ page as indicated at step 230.

The next step 232 is to then call the routine at the task₋₋ address andto execute the next task. The task₋₋ table₋₋ index is then incremented.Operations then return to step 208.

The present invention resides in the present algorithm for an operatingsystem kernel for use in an electricity meter. The particular modes ofoperations and tasks may be defined by a system operator in a mannerconsistent with how the meter is to be used. For example, a variety ofmodes such as time-of-use mode, demand only mode, fail safe mode,catch-up (after a failure) mode, and communications mode can beimplemented.

As hereinbefore described, when a mode is selected, task tables may bedownloaded from the ROM or EEPROM into the RAM memory block. Executionof the task tables may be performed from the RAM memory block only orfrom some combination of respective memory blocks. When a mode changeoccurs, different task tables are to be executed and may be downloadedinto the RAM to replace the task tables from the previously selectedmode. The operating system kernel hereinbefore described, however, doesnot change when a different mode is selected.

Appendix A is a listing of pseudo code for execution of an embodiment ofthe operating system kernel. Appendix B is a listing of the demand onlymode table. Appendix C is a listing of demand only task tables. AppendixD is a listing of the time-of-use and demand mode table, and Appendix Eis a listing of the task tables for time-of-use operation. These pseudocode listings are provided to further exemplify one embodiment of a tasktable driven operating system for an electricity meter.

While the present invention has been described with respect to specificembodiments, many modifications, variations, substitutions, andequivalents will be apparent to those skilled in the art. Accordingly,the invention is to be considered as limited only by the spirit andscope of the appended claims.

                  APPENDIX A                                                      ______________________________________                                        COPYRIGHT (C) 1990 GENERAL ELECTRIC COMPANY                                   ______________________________________                                        task.sub.-- table.sub.-- index = INITIALIZATION.sub.-- TASK                   REPEAT                                                                         WHILE (task.sub.-- address <> SENTINEL.sub.-- VALUE)                          AND (os.sub.-- mode.sub.-- change.sub.-- status <> IMMEDIATE)                  task.sub.-- page = page specified in task.sub.-- table.sub.-- buffer          [task.sub.-- table.sub.-- index]                                              task.sub.-- address = address specified in task.sub.-- table.sub.--         buffer                                                                          [task.sub.-- table.sub.-- index]                                              IF task.sub.-- address >= DATA.sub.-- RAM.sub.-- START                         perform change.sub.-- data.sub.-- ram.sub.-- page(task.sub.-- page)          ELSE                                                                           perform change.sub.-- code.sub.-- ram.sub.-- page(task.sub.-- page)          ENDIF                                                                         perform call to task.sub.-- address                                           increment task.sub.-- table.sub.-- index                                     ENDWHILE                                                                      previous.sub.-- os.sub.-- mode =  current.sub.-- os.sub.-- mode               current.sub.-- os.sub.-- mode = next.sub.-- os.sub.-- mode                    IF current.sub.-- os.sub.-- mode = previous.sub.-- os.sub.-- mode              task.sub.-- table.sub.-- index = FIRST.sub.-- REPEATED.sub.-- TASK           ELSE                                                                           task.sub.-- table.sub.-- index = INITIALIZATION.sub.-- TASK                   perform update.sub.-- os.sub.-- mode()                                       ENDIF                                                                        FOREVER                                                                       ______________________________________                                    

                  APPENDIX B                                                      ______________________________________                                        COPYRIGHT (C) 1990 GENERAL ELECTRIC COMPANY                                   ______________________________________                                        rom.sub.-- mode.sub.-- table:                                                 DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- initialization.sub.-- task.sub.-- table                   DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- demand.sub.-- only.sub.-- task.sub.-- table               DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- demand.sub.-- only.sub.-- power.sub.-- fail.sub.--                 task.sub.-- table                                                    DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- demand.sub.-- only.sub.-- test.sub.-- mode.sub.--                  task.sub.-- table                                                    DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- optocom.sub.-- mode.sub.-- task.sub.-- table              DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- std.sub.-- protocol.sub.-- mode.sub.-- task.sub.--                 table                                                                DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- fail.sub.-- safe.sub.-- mode.sub.-- task.sub.--                    table                                                                DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- fail.sub.-- safe.sub.-- test.sub.-- mode.sub.--                    task.sub.-- table                                                    DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- fail.sub.-- safe.sub.-- initialization.sub.--                      mode.sub.-- task.sub.-- table                                        DB       PAGE.sub.-- 1                                                        DW       rom.sub.-- manufacturing.sub.-- test.sub.-- mode.sub.-- task.sub.             -- table                                                             ______________________________________                                    

                  APPENDIX C                                                      ______________________________________                                        COPYRIGHT (C) 1990 GENERAL ELECTRIC COMPANY                                   ______________________________________                                        rom.sub.-- task.sub.-- tables:                                                rom.sub.-- initialization.sub.-- task.sub.-- table:                           DB         PAGE.sub.-- 0                                                      DW         initialization.sub.-- mode.sub.-- init                             DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- task.sub.-- initialization                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- parameter.sub.-- program                               DB         PAGE.sub.-- 0                                                      DW         init.sub.-- totals.sub.-- task                                     DB         PAGE.sub.-- 0                                                      DW         time.sub.-- date.sub.-- initialization                             DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- calc.sub.-- initialization                           DB         PAGE.sub.-- 0                                                      DW         init.sub.-- external.sub.-- control.sub.-- task                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- check.sub.-- thresholds.sub.-- task                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- reset.sub.-- switch.sub.-- control.sub.-- task         DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task.sub.-- init                                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- high.sub.-- level.sub.-- init              DB         PAGE.sub.-- 0                                                      DW         high.sub.-- level.sub.-- initialization                            DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- demand.sub.-- only.sub.-- task.sub.-- table:                       DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- mode.sub.-- init                         DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- monitor                                       DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         totals.sub.-- task                                                 DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- time.sub.-- date.sub.-- task.sub.--                 support                                                            DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- demand.sub.-- calculation                DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         external.sub.-- control.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         check.sub.-- thresholds.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         reset.sub.-- switch.sub.-- control.sub.-- task                     DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         inactive.sub.-- test.sub.-- mode                                   DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- demand.sub.-- only.sub.-- power.sub.-- fail.sub.-- task.sub.--     table:                                                                        DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- power.sub.-- fail.sub.-- mode.sub.--                init                                                               DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- power.sub.-- fail.sub.-- totals          DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- time.sub.-- date.sub.-- task.sub.--                 support                                                            DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- demand.sub.-- calculation                DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- demand.sub.-- only.sub.-- test.sub.-- mode.sub.-- task.sub.--      table:                                                                        DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- initialization.sub.-- task                 DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         totals.sub.-- test.sub.-- support                                  DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- only.sub.-- time.sub.-- date.sub.-- task.sub.--                 support                                                            DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- demand.sub.-- calculation                  DB         PAGE.sub.-- 0                                                      DW         external.sub.-- control.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         check.sub.-- thresholds.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         reset.sub.-- switch.sub.-- control.sub.-- task                     DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         active.sub.-- test.sub.-- mode                                     DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- optocom.sub.-- mode.sub.-- task.sub.-- table:                      DB         PAGE.sub.-- 0                                                      DW         optocom.sub.-- mode.sub.-- init                                    DB         PAGE.sub.-- 0                                                      DW         optocom.sub.-- message.sub.-- handler                              DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- optocom                                    DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- std.sub.-- protocol.sub.-- mode.sub.-- task.sub.-- table:          DB         PAGE.sub.-- 0                                                      DW         std.sub.-- protocol.sub.-- mode.sub.-- init                        DB         PAGE.sub.-- 0                                                      DW         std.sub.-- protocol.sub.-- task                                    DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- optocom                                    DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- fail.sub.-- safe.sub.-- mode.sub.-- task.sub.-- table:             DB         PAGE.sub.-- 0                                                      DW         fail.sub.-- safe.sub.-- mode.sub.-- init                           DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- monitor                                       DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         fail.sub.-- safe.sub.-- totals                                     DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         inactive.sub.-- test.sub.-- mode                                   DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- fail.sub.-- safe.sub.-- test.sub.-- mode.sub.-- task.sub.--        table:                                                                        DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- initialization.sub.-- task                 DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         totals.sub.-- test.sub.-- support                                  DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- demand.sub.-- calculation                  DB         PAGE.sub.-- 0                                                      DW         check.sub.-- thresholds.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         reset.sub.-- switch.sub.-- control.sub.-- task                     DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         active.sub.-- test.sub.-- mode                                     DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- fail.sub.-- safe.sub.-- initialization.sub.-- mode.sub.--          task.sub.-- table:                                                            DB         PAGE.sub.-- 0                                                      DW         fail.sub.-- safe.sub.-- initialization.sub.-- mode.sub.--                     init                                                               DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- task.sub.-- initialization                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- parameter.sub.-- program                               DB         PAGE.sub.-- 0                                                      DW         init.sub.-- totals.sub.-- task                                     DB         PAGE.sub. -- 0                                                     DW         time.sub.-- date.sub.-- initialization                             DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- calc.sub.-- initialization                           DB         PAGE.sub.-- 0                                                      DW         init.sub.-- check.sub.-- thresholds.sub.-- task                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- reset.sub.-- switch.sub.-- control.sub.-- task         DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task.sub.-- init                                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- fail.sub.-- safe.sub.-- init               DB         PAGE.sub.-- 0                                                      DW         high.sub.-- level.sub.-- initialization                            DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              rom.sub.-- manufacturing.sub.-- test.sub.-- mode.sub.-- task.sub.--           table:                                                                        DB         PAGE.sub.-- 0                                                      DW         manufacturing.sub.-- test.sub.-- mode.sub.-- init                  DB         PAGE.sub.-- 0                                                      DW         manufacturing.sub.-- test.sub.-- task                              DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              ______________________________________                                    

                  APPENDIX D                                                      ______________________________________                                        COPYRIGHT (C) 1990 GENERAL ELECTRIC COMPANY                                   ______________________________________                                        ram.sub.-- mode.sub.-- table:                                                 DB         PAGE.sub.-- 1                                                      DW         tou.sub.-- demand.sub.-- initialization.sub.-- task.sub.--                    table                                                              DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- demand.sub.-- only.sub.-- task.sub.-- table             DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- demand.sub.-- only.sub.-- power.sub.-- fail.sub.--                 task.sub.-- table                                                  DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- demand.sub.-- only.sub.-- test.sub.-- mode.sub.--                  task.sub.-- table                                                  DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- optocom.sub.-- mode.sub.-- task.sub.-- table            DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- std.sub.-- protocol.sub.-- mode.sub.-- task.sub.--                 table                                                              DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- fail.sub.-- safe.sub.-- mode.sub.-- task.sub.--                    table                                                              DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- fail.sub.-- safe.sub.-- test.sub.-- mode.sub.--                    task.sub.-- table                                                  DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- fail.sub.-- safe.sub.-- initialization.sub.--                      mode.sub.-- task.sub.-- table                                      DB         PAGE.sub.-- 0                                                      DW         rom.sub.-- manufacturing.sub.-- test.sub.-- mode.sub.--                       task.sub.-- table                                                  DB         PAGE.sub.-- 1                                                      DW         tou.sub.-- demand.sub.-- task.sub.-- table                         DB         PAGE.sub.-- 1                                                      DW         catch.sub.-- up.sub.-- mode.sub.-- task.sub.-- table               DB         PAGE.sub.-- 1                                                      DW         tou.sub.-- demand.sub.-- test.sub.-- mode.sub.-- task.sub.--                  table                                                              DB         PAGE.sub.-- 0                                                      DW         0000H   ;extra entry                                               DB         PAGE.sub.-- 0                                                      DW         0000H   ;extra entry                                               ______________________________________                                    

                  APPENDIX E                                                      ______________________________________                                        COPYRIGHT (C) 1990 GENERAL ELECTRIC COMPANY                                   ______________________________________                                        ram.sub.-- task.sub.-- tables:                                                tou.sub.-- demand.sub.-- initialization.sub.-- task.sub.-- table:             DB         PAGE.sub.-- 0                                                      DW         initialization.sub.-- mode.sub.-- init                             DB         PAGE.sub.-- 0                                                      DW         high.sub.-- level.sub.-- initialization                            DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- task.sub.-- initialization                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- parameter.sub.-- program                               DB         PAGE.sub.-- 0                                                      DW         init.sub.-- totals.sub.-- task                                     DB         PAGE.sub.-- 0                                                      DW         time.sub.-- data.sub.-- initialization                             DB         PAGE.sub.-- 2                                                      DW         init.sub.-- prog.sub.-- dates.sub.-- task                          DB         PAGE.sub.-- 0                                                      DW         demand.sub.-- calc.sub.-- initialization                           DB         PAGE.sub.-- 2                                                      DW         init.sub.-- season.sub.-- change.sub.-- task                       DB         PAGE.sub.-- 0                                                      DW         init.sub.-- external.sub.-- control.sub.-- task                    DB         PAGE.sub.-- 2                                                      DW         init.sub.-- rate.sub.-- change.sub.-- task                         DB         PAGE.sub.-- 2                                                      DW         init.sub.-- load.sub.-- profile.sub.-- task                        DB         PAGE.sub.-- 0                                                      DW         init.sub.-- check.sub.-- thresholds.sub.-- task                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- reset.sub.-- switch.sub.-- control.sub.-- task         DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task.sub.-- init                                    DB         PAGE.sub.-- 0                                                      DW         init.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- high.sub.-- level.sub.-- init              DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              tou.sub.-- demand.sub.-- task.sub.-- table:                                   DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- mode.sub.-- init                          DB         PAGE.sub.-- 0                                                      DW         abort.sub.-- after.sub.-- power.sub.-- fail                        DB         PAGE.sub.-- 0                                                      DW         communication.sub.-- monitor                                       DB         PAGE.sub.-- 0                                                      DW         continue.sub.-- after.sub.-- power.sub.-- fail                     DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         totals.sub.-- task                                                 DB         PAGe.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- time.sub.-- date.sub.-- task.sub.--                  support                                                            DB         PAGE.sub.-- 2                                                      DW         programmable.sub.-- dates.sub.-- task                              DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- demand.sub.-- calculation                 DB         PAGE.sub.-- 2                                                      DW         season.sub.-- change.sub.-- task                                   DB         PAGE.sub.-- 2                                                      DW         rate.sub.-- change.sub.-- task                                     DB         PAGE.sub.-- 2                                                      DW         load.sub.-- profile.sub.-- recording.sub.-- task                   DB         PAGE.sub.-- 0                                                      DW         exgternal.sub.-- control.sub.-- task                               DB         PAGE.sub.-- 0                                                      DW         check.sub.-- thresholds.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         reset.sub.-- switch.sub.-- control.sub.-- task                     DB         PAGE.sub.-- 0                                                      DW         abort.sub.-- after.sub.-- power.sub.-- fail                        DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         inactive.sub.-- test.sub.-- mode                                   DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         continue.sub.-- after.sub.-- power.sub.-- fail                     DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         self.sub.-- test.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              catch.sub.-- up.sub.-- mode.sub.-- task.sub.-- table:                         DB         PAGE.sub.-- 2                                                      DW         catch.sub.-- up.sub.-- mode.sub.-- init                            DB         PAGE.sub.-- 2                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 2                                                      DW         totals.sub.-- catch.sub.-- up.sub.-- support                       DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- time.sub.-- date.sub.-- task.sub.--                  support                                                            DB         PAGE.sub.-- 2                                                      DW         programmable.sub.-- dates.sub.-- task                              DB         PAGE.sub.-- 2                                                      DW         fast.sub.-- catch.sub.-- up.sub.-- task                            DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- demand.sub.-- calculation                 DB         PAGE.sub.-- 2                                                      DW         season.sub.-- change.sub.-- task                                   DB         PAGE.sub.-- 2                                                      DW         rate.sub.-- change.sub.-- task                                     DB         PAGE.sub.-- 2                                                      DW         load.sub.-- profile.sub.-- recording.sub.-- task                   DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              tou.sub.-- demand.sub.-- test.sub.-- mode.sub.-- task.sub.-- table:           DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- initialization.sub.-- task                 DB         PAGE.sub.-- 0                                                      DW         prevent.sub.-- power.sub.-- fail.sub.-- interrupt                  DB         PAGE.sub.-- 0                                                      DW         totals.sub.-- test.sub.-- support                                  DB         PAGE.sub.-- 2                                                      DW         tou.sub.-- demand.sub.-- time.sub.-- date.sub.-- task.sub.--                  support                                                            DB         PAGE.sub.-- 2                                                      DW         programmable.sub.-- dates.sub.-- task                              DB         PAGE.sub.-- 0                                                      DW         test.sub.-- mode.sub.-- demand.sub.-- calculation                  DB         PAGE.sub.-- 2                                                      DW         season.sub.-- change.sub.-- task                                   DB         PAGE.sub.-- 2                                                      DW         rate.sub.-- change.sub.-- task                                     DB         PAGE.sub.-- 2                                                      DW         load.sub.-- profile.sub.-- recording.sub.-- task                   DB         PAGE.sub.-- 0                                                      DW         external.sub.-- control.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         check.sub.-- thersholds.sub.-- task                                DB         PAGE.sub.-- 0                                                      DW         reset.sub.-- switch.sub.-- control.sub.-- task                     DB         PAGE.sub.-- 0                                                      DW         allow.sub.-- power.sub.-- fail.sub.-- interrupt                    DB         PAGE.sub.-- 0                                                      DW         display.sub.-- task                                                DB         PAGE.sub.-- 0                                                      DW         param.sub.-- pgm.sub.-- task                                       DB         PAGE.sub.-- 0                                                      DW         active.sub.-- test.sub.-- mode                                     DB         00H                                                                DW         SENTINEL.sub.-- VALUE                                              ______________________________________                                    

What is claimed is:
 1. A programmable solid-state electronic registercomponent for an electrical energy meter, comprising:a mode table; aplurality of task tables; a plurality of modules;wherein said mode tablecomprises an array of task pointers to respective ones of said pluralityof task tables, wherein each of said plurality of task tables comprisesan array of module pointers to corresponding ones of said plurality ofmodules, wherein each of said plurality of modules comprises a pluralityof instructions to be executed during the performance of a correspondingtask, which is included in at least one of predetermined groups oftasks, and wherein each of said predetermined groups of tasks is definedby one of said task tables and corresponds to a predetermined mode ofoperation such as a time-of-use and demand mode of operation or ademand-only mode of operation; and micro-controller means for operatingsaid register component in said predetermined mode of operation byexecuting a corresponding predetermined group of tasks, saidmicro-controller means comprisingmeans for indexing to a task pointer insaid mode table to thereby select one of said predetermined groups oftasks, said task pointer corresponding to a selected task table, meansfor executing said one of said predetermined groups of tasks byrepeatedly indexing said selected task table to respective modulepointers, and means for executing said plurality of modulescorresponding to said respective module pointers.
 2. The programmablesolid-state electronic register component of claim 1, wherein said modetable, said plurality of task tables and said plurality of modules arecontained in memory comprising read-only memory and random-access memoryand wherein said means for executing said one of said predeterminedgroups of tasks comprises means for executing said one of saidpredetermined groups of tasks in said random-access memory.
 3. Theprogrammable solid-state electronic register component of claim 2,further comprising input/output means responsive to actuation by a userfor selecting said programmed mode of operation and means fordownloading said task tables corresponding to said programmed mode ofoperation to said random-access memory.
 4. The programmable solid-stateelectronic register component of claim 3, wherein said means fordownloading said task tables comprises means for downloading said tasktables corresponding to said programmed mode of operation from saidread-only memory to said random-access memory.
 5. The programmablesolid-state electronic register component of claim 4, wherein saidinput/output means comprises a liquid crystal display.
 6. Theprogrammable solid-state electronic register component of claim 1,wherein said arrays of module pointers for each of said task tablesinclude a mode-initialization pointer corresponding to a respectivemode-initialization module and wherein said means for executing saidplurality of modules comprises means for executing said respectivemode-initialization module only once during said programmed mode ofoperation.
 7. The programmable solid-state electronic register componentof claim 3, wherein said arrays of module pointers for each of said tasktables include a mode-initialization pointer corresponding to arespective mode-initialization module and wherein said means forexecuting said plurality of modules comprises means for executing saidrespective mode-initialization module only once during said programmedmode of operation.
 8. The programmable solid-state electronic registercomponent of claim 7, further comprising:means for halting said meansfor executing said one of said predetermined groups of tasks prior toindexing the entire selected task table; and means for initializing saidmeans for downloading said task tables corresponding to anotherprogrammed mode of operation from said read-only memory to saidrandom-access memory.
 9. The programmable solid-state electronicregister component of claim 2, wherein said memory and saidmicrocontroller means are contained in an application specificintegrated circuit.